<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="cn.ainit.sys.menu.SessionCont"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/ainit.css" type="text/css"></link>
		<link rel="stylesheet" href="../printCss/print.css" type="text/css"></link>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/sysPrint/printCss/print.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.2.2.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.json-2.4.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.ainit-1.0.0.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/jquery.ainit-1.1.0.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/model.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/perlize.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/save.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/initPage.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/sysReport/report.js"></script>

		<script type="text/javascript">
			$(function() {
				$("#dotted :last ").remove()
			});
		</script>
		        <script type="text/javascript">
        window.onload=function name(){
          window.print();
          window.close();
    }
     </script> 
		<style type="text/css">
		table{border-collapse:collapse;
			}
		</style>
	</head>
	<body>
<table cellpadding="0px" cellspacing="0px" width="730px" border="0">
                        <tr>
                            <th colspan="40" style="font-size: 22px">${Company.COM_PRINTNAME}印厂对账单</th>
                        </tr>

                        <tr>
                            <td ><strong>付款对象:</strong></td>
                            <td  width="140">${data.m_name}</td>
                            <td ><strong>账期内金额:</strong></td>
                            <td  width="140">${data.REAL_MONEY}</td>
                            <td width="100"><strong>账期外金额:</strong></td>
                            <td width="140" >${data.ZQWMONEY}</td>
                            <td ><strong>总欠款:</strong></td>
                            <td width="140">${data.ZQKMONEY}</td>
                        </tr>
                            <tr>
                                <td ><strong>单据号:</strong></td>
                                <td width="140">${data.DJ_CODE}</td>
                                <td ><strong>备注:</strong></td>
                                <td width="140">${data.MEMO}</td>
                                <td width="100"><strong>打印日期:</strong></td>
                                <td >
                                    <jsp:useBean id="now" class="java.util.Date" scope="page" />
                                    <fmt:formatDate value="${now}" pattern="yyyy-MM-dd" />
                                </td>
                            </tr>
                        <tr>
                            <td colspan="8"><hr width=730px /></td>
                        </tr>
                        <tr>
                            <td colspan="8"> 账期内：</td></tr>
                        <tr height="12px"> 
                            <td width="80" align="center"><strong>序号</strong></td>
                            <td width="80" ><strong>到期付款日</strong></td>
                            <td width="170" ><strong >图书名称</strong></td>
                            <td width="10" align="center"><strong>印次</strong></td>
                            <td width="130" ><strong>出版社</strong> </td>
                            <td width="50" align="center"><strong>装帧</strong></td>
                            <td width="50" ><strong>入库数</strong></td>
                            <td width="50" ><strong>金额</strong></td>
                        </tr>
                        <tr height="12px">
                            <td colspan="8"><hr width=730px align="left" /></td>
                        </tr>
                        <c:forEach items="${dataList}" var="temp">
                            <c:if test="${temp.D_TYPE=='ZN'}">
                                <tr >
                                    <td width="80" align="center">${temp.ROWNUM}</td>
                                    <td width="80" >${temp.FK_DATE} </td>
                                    <td width="170" >${temp.h_name}</td>
                                    <td width="10" align="center">${temp.YINCI}</td>
                                    <td width="130" >${temp.pub_name}</td>
                                    <td width="50" align="center">${temp.ZHUANGZHEN}</td>
                                    <td width="50" >${temp.YINSHU}</td>
                                    <td width="50" >${temp.COST_RATE}</td>

                                </tr>
                                <tr id="dotted">
                                    <td colspan="8">
                                        <hr width=730px align="left" style="border: 1px dotted;" />
                                    </td>
                                </tr>
                            </c:if>
                        </c:forEach>
                        <tr>
                            <td colspan="8"><hr width=730px align="left" /></td>
                        </tr>

                        <tr>
                            <td colspan="8">账期外：</td>
                        </tr>
                        <tr>
                            <td colspan="8" width=730px align="left" ></td>
                        </tr>
                        <tr >
                            <td width="80" align="center"><strong>序号</strong></td>
                            <td width="80" ><strong>到期付款日</strong></td>
                            <td width="170" ><strong >图书名称</strong></td>
                            <td width="10" align="center"><strong>印次</strong></td>
                            <td width="130" ><strong>出版社</strong> </td>
                            <td width="50" align="center"><strong>装帧</strong></td>
                            <td width="50" ><strong>入库数</strong></td>
                            <td width="50" ><strong>金额</strong></td>
                        </tr>
                        <tr>
                            <td colspan="8">
                                <hr width=730px align="left" />
                            </td>
                        </tr>
                        <c:forEach items="${dataList}" var="temp">
                            <c:if test="${temp.D_TYPE=='ZW'}">
                                <tr>
                                    <td width="80" align="center">${temp.ROWNUM}</td>
                                    <td width="80" >${temp.FK_DATE} </td>
                                    <td width="170" >${temp.h_name}</td>
                                    <td width="10" align="center">${temp.YINCI}</td>
                                    <td width="130" >${temp.pub_name}</td>
                                    <td width="50" align="center">${temp.ZHUANGZHEN}</td>
                                    <td width="50" >${temp.YINSHU}</td>
                                    <td width="50" >${temp.COST_RATE}</td>
                                </tr>
                                <tr id="dotted">
                                    <td colspan="8">
                                        <hr width=730px style="border: 1px dotted;" />
                                    </td>
                                </tr>
                            </c:if>
                        </c:forEach>
                        <tr>
                            <td colspan="8">
                                <hr width=730px align="left" />
                            </td>
                        </tr>

                        <tr height="20">
                          <td  colspan="2">
                              确认无误请签章回传，谢谢！
                            </td>
                            <td colspan="6"  align="right">
                                联系电话：010-64628978/64628976
                            </td>
                        </tr>

                        <tr height="20"></tr>
		
        				<tr height="40">
                            <td colspan="13" align="right">
                                <span style="font-size: 11px ;color: #9BA4AF">技术支持:</span>
                                <span style="font-size: 12px ;color: #9BA4AF">上海爱你特科技  www.ainit.cn</span>			
                            </td>
                        </tr>
                 </table>
    </body>
</html>